[Repo Assist] perf: parallelise test project builds when running tests#2150
Draft
github-actions[bot] wants to merge 2 commits intomainfrom
Draft
[Repo Assist] perf: parallelise test project builds when running tests#2150github-actions[bot] wants to merge 2 commits intomainfrom
github-actions[bot] wants to merge 2 commits intomainfrom
Conversation
Previously, buildProject was invoked sequentially via mapExecuteForAll for each project in the run request. Switch to executeWithMaxParallel (capped at maxParallelTestProjects = 3) so builds run concurrently, matching the pattern already used for the actual test-execution step. This is a companion change to the parallel-builds improvement in refreshTestList (PR #2142). The benefit is most visible when the user chooses 'Run All Tests' across a solution with several test projects. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
39 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 This PR was created by Repo Assist, an automated AI assistant.
Summary
When the user clicks Run Tests in the Test Explorer, Ionide builds each test project before executing the tests. Previously this was done sequentially via
Promise.mapExecuteForAll. This PR switches toPromise.executeWithMaxParallel maxParallelTestProjects(capped at 3 concurrent builds, the same limit used for test execution) so that project builds happen in parallel.Motivation
This is a companion change to PR #2142, which parallelises builds in
refreshTestList. The run-tests path (runTestsHandler) had the same sequential bottleneck. The improvement is most noticeable when a user runs all tests across a solution with several test projects — instead of building them one-by-one, up to 3 are built concurrently.Changes
src/Components/TestExplorer.fs:Promise.mapExecuteForAll (buildProject testRun)→Promise.executeWithMaxParallel maxParallelTestProjects (buildProject testRun)in the run-tests build stepList.choose idtoArray.choose id |> List.ofArrayto match the array return type ofexecuteWithMaxParallelTrade-offs
executeWithMaxParallelis bounded concurrency (max 3 parallel builds), so it won't overwhelm machines with large solutionsexecuteWithMaxParallelTest Status
The build infrastructure in this environment requires
dotnet tool restore+ FAKE, which is not available without a full CI run. The change is a two-line mechanical substitution matching the same pattern already used in the test-execution step (line 1994) and in the refresh path (PR #2142). No logic changes — only the scheduling strategy for the builds is affected.